<template>
  <div class="power-box">
    <el-container>
      <el-header class="power-header">
        <el-button type="primary" size="mini">创建角色</el-button>
      </el-header>

      <el-main>
        <el-table :data="tableData" stripe style="width: 100%" border>
          <el-table-column prop="date" label="角色名称" width="180">
          </el-table-column>
          <el-table-column prop="name" label="创建时间" width="180">
          </el-table-column>
          <el-table-column prop="address" label="授权时间"> </el-table-column>
          <el-table-column prop="address" label="授权人"> </el-table-column>
          <el-table-column prop="address" label="地址">
            <template>
              <el-button size="small"> 设置权限 </el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-main>
      <el-footer>
        <el-footer
          ><el-pagination
            background
            layout="prev, pager, next"
            :total="total"
            :current-page="1"
            :page-size="5"
            @current-change="handleCurrentChange"
          >
          </el-pagination
        ></el-footer>
      </el-footer>
    </el-container>
  </div>
</template>
<script>

import getUser from "../../api/getUser"
export default {
  data() {
    return {
      total: 30,
      tableData: [
      ],
      req: {
        pageNum:1,
        pageSize:5
      }
    };
  },
  methods: {
    handleCurrentChange() {
    },
  },
  mounted() {
    getUser(this.req).then((a)=>{
      this.tableData=a.data
    })
  }
};
</script>


<style lang="scss" scoped>
.el-pagination {
    display: flex;
    justify-content: center;
}
.power-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
</style>